package ModelLayer;


/**
 * A Class to represent a Corporate customer extending the Customer class with 2 new fields
 * 
 * @authors Mike M. Madsen, Rasmus A. Borup 
 * @version 15/12-2013
 */

public class CorporateCustomer extends Customer
{
    // instance variables
    private String accountNO;
    private boolean vatRegistered;

    /**
     * Constructor for objects of class CorporateCustomer without parameters for testing
     */
    public CorporateCustomer()
    {
        //Creates a Customer from superclass by calling constructor
        //without parameters and extends it with the fields of CorporateCustomer
        super();
        accountNO = "0123456789";
        vatRegistered = false;
    }
    
    /**
     * Constructor for objects of class CorporateCustomer
     */
    public CorporateCustomer(String name, String email, String address, String phoneNO,
                                     String zipCode, String city, String accountNO, boolean vatRegistered)
    {
        //Creates a Customer from superclass by calling constructor 
        //with parameters passing information from this constructor 
        //to that of the superclass and extends it with the fields
        //of CorporateCustomer
        super(name, email, address, phoneNO, zipCode, city);
        this.accountNO = accountNO;
        this.vatRegistered = vatRegistered;
    }
    
    /**
     * Returns a string containing details about a Corporate Customer
     */
    public String detailsString()
    {
        String details = super.detailsString() + "\n Account number: " + accountNO + "\n Vat registered: " + vatRegistered + "\n";
        return details;
    }
    
    //Mutators and accessors
    public String getAccountNO()
    {
        return accountNO;
    }
    
    public void setAccountNO(String accountNO)
    {
        this.accountNO = accountNO;
    }
    
    public boolean getVatRegistered()
    {
        return vatRegistered;
    }
    
    public void setVatRegistered(boolean vatRegistered)
    {
        this.vatRegistered = vatRegistered;
    }

}
